<?php


class Ext_View_Form_Admin_Base_Style extends Zend_Form
{

    public function init()
    {
        $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
        $bootstrap->bootstrap('view');
        $view = $bootstrap->getResource('view');
        $translate = Zend_Registry::get('Zend_Translate');
        
        $this->setAction($view->url(array('module'=>'admin', 'controller'=>'base', 'action'=>'save'),'default',true))
            ->setMethod('post')
            ->setAttrib('id', 'mainForm')
            ->setAttrib('name', 'mainForm')
            ->setDecorators(array(
                'FormElements', array('HtmlTag', array('tag' => 'dl', 'class'=>'formUiB')),
                'Form',
              ))
            ->setTranslator($translate);
            ;
            
        $formElements = array();
        
        $formElement = new Zend_Form_Element_Select('defaultTheme');
        $formElement->setLabel($translate->_("Default theme"))
            ->setRequired(true)
            ->addValidator('NotEmpty')
            ->setAttrib('validate', '{required:true}')
            ->setDecorators(array(
                'ViewHelper',
                array('Description', array('class' => 'tip', 'tag' => "div", 'id' => "tip-defaultTheme")),
                array('HtmlTag', array('tag' => 'dd')),
                array('Label', array('tag' => 'dt')),
                'Errors',
              ))
            ;
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Select('styleBase');
        $formElement->setLabel($translate->_("Base style"))
            ->setRequired(true)
            ->addValidator('NotEmpty')
            ->setAttrib('validate', '{required:true}')
            ->setDecorators(array(
                'ViewHelper',
                array('Description', array('class' => 'tip', 'tag' => "div", 'id' => "tip-styleBase")),
                array('HtmlTag', array('tag' => 'dd')),
                array('Label', array('tag' => 'dt')),
                'Errors',
              ))
            ;
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Select('stylePagination');
        $formElement->setLabel($translate->_("Pagination style"))
            ->setRequired(true)
            ->addValidator('NotEmpty')
            ->setAttrib('validate', '{required:true}')
            ->setDecorators(array(
                'ViewHelper',
                array('Description', array('class' => 'tip', 'tag' => "div", 'id' => "tip-stylePagination")),
                array('HtmlTag', array('tag' => 'dd')),
                array('Label', array('tag' => 'dt')),
                'Errors',
              ))
            ;
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Select('styleJqueryui');
        $formElement->setLabel($translate->_("Jqueryui style"))
            ->setRequired(true)
            ->addValidator('NotEmpty')
            ->setAttrib('validate', '{required:true}')
            ->setDecorators(array(
                'ViewHelper',
                array('Description', array('class' => 'tip', 'tag' => "div", 'id' => "tip-styleJqueryui")),
                array('HtmlTag', array('tag' => 'dd')),
                array('Label', array('tag' => 'dt')),
                'Errors',
              ))
            ;
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Select('styleBlueprint');
        $formElement->setLabel($translate->_("Blueprint style"))
            ->setRequired(true)
            ->addValidator('NotEmpty')
            ->setAttrib('validate', '{required:true}')
            ->setDecorators(array(
                'ViewHelper',
                array('Description', array('class' => 'tip', 'tag' => "div", 'id' => "tip-blueprint")),
                array('HtmlTag', array('tag' => 'dd')),
                array('Label', array('tag' => 'dt')),
                'Errors',
              ))
            ;
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Select('styleImageGallery');
        $formElement->setLabel($translate->_("ImageGallery style"))
            ->setRequired(true)
            ->addValidator('NotEmpty')
            ->setAttrib('validate', '{required:true}')
            ->setDecorators(array(
                'ViewHelper',
                array('Description', array('class' => 'tip', 'tag' => "div", 'id' => "tip-imageGallery")),
                array('HtmlTag', array('tag' => 'dd')),
                array('Label', array('tag' => 'dt')),
                'Errors',
              ))
            ;
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Select('styleSyntaxhighlighter');
        $formElement->setLabel($translate->_("Syntaxhighlighter style"))
            ->setRequired(true)
            ->addValidator('NotEmpty')
            ->setAttrib('validate', '{required:true}')
            ->setDecorators(array(
                'ViewHelper',
                array('Description', array('class' => 'tip', 'tag' => "div", 'id' => "tip-syntaxhighlighter")),
                array('HtmlTag', array('tag' => 'dd')),
                array('Label', array('tag' => 'dt')),
                'Errors',
              ))
            ;
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Submit('submit');
        $formElement->setLabel("Submit");
        $formElements[] = $formElement;
        
        $this->addElements($formElements);
    }

}
